package com.wmada.toolkit.rest;

import org.apache.http.HttpEntity;

import java.util.Map;

/**
 * @author will.ma
 * @date 2020-3-2
 */
public class DownloadUtils {

    public static Downloader getInstance() {
        return new Downloader();
    }

    public static Response head(String url) {
        return Downloader.INSTANCE.head(url);
    }

    public static Response head(String url, Map<String, String[]> params) {
        return Downloader.INSTANCE.head(url, params);
    }

    public static Response options(String url) {
        return Downloader.INSTANCE.options(url);
    }

    public static Response options(String url, Map<String, String[]> params) {
        return Downloader.INSTANCE.options(url, params);
    }

    public static Response get(String url) {
        return Downloader.INSTANCE.get(url);
    }

    public static Response get(String url, Map<String, String[]> params) {
        return Downloader.INSTANCE.get(url, params);
    }

    public static Response put(String url, HttpEntity entity) {
        return Downloader.INSTANCE.put(url, entity);
    }

    public static Response put(String url, Map<String, String[]> params, HttpEntity entity) {
        return Downloader.INSTANCE.put(url, params, entity);
    }

    public static Response post(String url, HttpEntity entity) {
        return Downloader.INSTANCE.post(url, entity);
    }

    public static Response post(String url, Map<String, String[]> params, HttpEntity entity) {
        return Downloader.INSTANCE.post(url, params, entity);
    }

    public static Response patch(String url, HttpEntity entity) {
        return Downloader.INSTANCE.patch(url, entity);
    }

    public static Response patch(String url, Map<String, String[]> params, HttpEntity entity) {
        return Downloader.INSTANCE.patch(url, params, entity);
    }

    public static Response delete(String url) {
        return Downloader.INSTANCE.delete(url);
    }

    public static Response delete(String url, Map<String, String[]> params) {
        return Downloader.INSTANCE.delete(url, params);
    }

}
